﻿using JTTD.Domain.Dtos;
using JTTD.Domain.Dtos.Activity.Response;
using JTTD.Domain.Dtos.Activity.Request;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace JTTD.Domain.IService
{
    /// <summary>
    /// 商城活动服务
    /// </summary>
    public  interface IActivityService : IDependency
    {
        /// <summary>
        /// 设置商城活动
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> SetActivity(SetActivityRequestDto dto);

        /// <summary>
        /// 更改启用状态
        /// </summary>
        /// <param name="activityId"></param>
        /// <param name="isEnable"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> ChangeEnable(int activityId, bool isEnable);

        /// <summary>
        /// 删除商城活动
        /// </summary>
        /// <param name="activityId"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> DeleteActivity(int activityId);

        /// <summary>
        /// 获取商城活动
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResult<ActivityInfoResponseDto>> GetActivity(int id);

        /// <summary>
        /// 获取所有进行中的商城活动
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<List<ActivityInfoResponseDto>>> GetEnableActivityList();

        /// <summary>
        /// 分页获取商城活动列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult<PageResult<ActivityInfoResponseDto>>> GetActivityPageList(SearchActivityRequestDto dto);

        /// <summary>
        /// 活动赠送积分
        /// </summary>
        /// <param name="activityId"></param>
        /// <param name="usrId"></param>
        /// <returns></returns>
        Task<ApiResult<bool>> JoinActivity(int activityId,int usrId);


      
    }
}
